#coding:utf-8

import redis


class Config(object):
    SECRET_KEY = 'dfasdasdasdas'

    SQLALCHEMY_DATABASE_URI = "mysql://root:123456yjk@127.0.0.1:3306/IHOME"
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379


    # session 配置
    SESSION_TYPE = 'redis'
    SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST , port=REDIS_PORT)
    SESSION_USE_SINGER = True  # 隐藏cookie
    PERMANENT_SESSION_LIFETIME = 86400


class DevelopmentConfig(Config):
    DEBUG = True


class ProductionConfig(Config):
    pass

config_map = {
    'develop': DevelopmentConfig,
    'product': ProductionConfig
}